//
// Created by jsjxsy on 2024/7/19.
//
#include <stdio.h>
int main() {
  FILE *file;
  char buf[1024] = {0,};
  file = fopen("/Users/admin/CLionProjects/ffmpeg_learn/file/1.txt", "a+");
  if(file){
    fwrite("hello, world!", 1, 13, file);
  }else{
    printf("open file error");
  }
  rewind(file);
  fread(buf, 1, 26, file);
  fclose(file);
  printf("buf:%s\n", buf);
  return 0;
}
